package com.example.broad.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.example.broad.BroadOrderActivity;

/**
 * @author: snjgm
 * data: 2022/7/22
 * description:
 */
public class BroadReciverFirst extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent != null && intent.getAction().equals(BroadOrderActivity.ORDER_ACTION)) {
            Log.d("TAG", "第一个广播接收器收到广播了");
            abortBroadcast();//中断广播
        }
    }
}
